<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<!--用模板引擎地址：https://blog.csdn.net/qq_24598601/article/details/89190411-->
<head>
      
    <meta charset="UTF-8"/>
      <title>springboot-thymeleaf demo</title>
    <style>
        .even {
            background: blue;
        }

        .odd {
            background: #ff0000;
        }
    </style>
</head>
<body>
  <p th:text="'hello, ' + ${name} + '!'"/>
<div th:text="我是不同形式的div"></div>
<span th:if="${sex}=='男'">男</span>
<span th:if="${sex}=='女'">女</span>
<span th:unless="${sex} == '女'">性别：女</span>
<table border="1">
    <tr>
        <th>id</th>
        <th>顾客名</th>
        <th colspan="3">货物名</th>
    </tr>
    <tr th:each="u : ${customerList}">
        <td th:text="${u.getCid()}"></td>
        <td th:text="${u.cname}"></td>
        <td th:each="good : ${u.goodsList}">
            <span th:text="${good.gname}"></span>
        </td>

    </tr>
</table>
</form>

<div th:text="#{msg}"></div><!--在配置文件读取用#号-->
<!--用th:include,th:insert.th:replace插入这个页面-->
<div th:insert="foot ::insert"></div>
<!--工具类-->
<div th:text="${#request.getAttribute('note')}"></div>
<!--string截取字符串-->
<p th:text="${#strings.substring(#request.getAttribute('not'),2,3)}"></p>
<!--转化时间-->
<p th:text="${#dates.format(#request.getAttribute('time'),'YYYY-MM-DD')}"></p>
<table>

    <tr>
        <td>id</td>
        <td>name</td>

    </tr>
    <tr th:each="entrys,var:${map}">
        <div th:class="${var.odd==true?'odd':'even'}">
            <td th:text="${entrys.value.cid}"/>
            <td th:text="${entrys.value.cname}"/>
        </div>
    </tr>
</table>
<!--下拉框的循环输出-->
<!--<select name="signature" lay-search="" class="form-control input1">-->
<!--    <option value="">请选择</option>-->
<!--    <option th:selected="${userSmsTemplateApplication.signature  eq userSmsTemplateApplication.signature}" &lt;!&ndash;回显选中&ndash;&gt;-->
<!--    th:each="userSmsTemplateApplication : ${userSmsTemplateApplications}" &lt;!&ndash;循环遍历集合&ndash;&gt;-->
<!--    th:value="${userSmsTemplateApplication.signature}" th:text="${userSmsTemplateApplication.signature}"> &lt;!&ndash;下拉显示后台动态数据&ndash;&gt;-->
<!--    </option>-->
<!--</select>-->
<span th:text="${swagger}"></span>
</body>
</html>